{% extends "fnr/base.html" %}
{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The form for posting an opinion on a resto.
  
  Created on 2008-11-04.
  $Id: post_opinion.html 271 2008-11-10 14:43:10Z heavyzheng $
-->
{% endcomment %}

{# ---------------------------------------------------------------------------------------------- #}

{% block html_head %}

<link rel="stylesheet" type="text/css" media="screen" href="/static/fnr/stylesheets/resto.css"/>

<title>Post your opinion on "{{ resto.name }}" :: Foods N' Roses</title>

<script type="text/javascript">//<![CDATA[

  function closeMessage() {
    $(".message").hide("slow");
  }
  
  function expandPostOpinionForm() {
    $("#post_opinion_form .comment-toggle").hide();
    $("#post_opinion_form .comment"       ).show();
  }

  function submitPostOpinionForm() {
    $("#post_opinion_form").hide();
    $("#submitting"       ).show("slow");
    $("#post_opinion_form").submit();
  }

//]]></script>

{% endblock %}{# html_head #}

{# ---------------------------------------------------------------------------------------------- #}

{% block content %}

{% include "fnr/sections/resto_names.html" %}

<div class="container">
  {% include "fnr/sections/resto_logo.html" %}
  {% include "fnr/sections/resto_address.html" %}
  {% include "fnr/sections/resto_desc.html" %}
  {% include "fnr/sections/resto_contact.html" %}
</div><!--/.container-->

<form id="post_opinion_form" action="." method="POST">

  <table>
    
    <tr>
      <td class="nowrap" colspan="2">
        <h2>Your ratings:</h2>
      </td>
    </tr>
    <tr>
      <td class="nowrap" width="1%">Cuisine:</td>
      <td class="nowrap">
        <select name="cuisine">
          <option value="1">Poor</option>
          <option value="2">Nothing special</option>
          <option value="3" selected="selected">Worth going</option>
          <option value="4">Pretty good</option>
          <option value="5">Excellent</option>
        </select>
      </td>
    </tr>
    <tr>
      <td class="nowrap" width="1%">Economy:</td>
      <td class="nowrap">
        <select name="economy">
          <option value="1">Poor</option>
          <option value="2">Nothing special</option>
          <option value="3" selected="selected">Worth going</option>
          <option value="4">Pretty good</option>
          <option value="5">Excellent</option>
        </select>
      </td>
    </tr>
    <tr>
      <td class="nowrap" width="1%">Service:</td>
      <td class="nowrap">
        <select name="service">
          <option value="1">Poor</option>
          <option value="2">Nothing special</option>
          <option value="3" selected="selected">Worth going</option>
          <option value="4">Pretty good</option>
          <option value="5">Excellent</option>
        </select>
      </td>
    </tr>
    
    <tr class="comment-toggle">
      <td class="nowrap" colspan="2">
        <a href="javascript:void(0);" onclick="expandPostOpinionForm();">Want to say something more?</a>
      </td>
    </tr>
    
    <tr class="comment hidden">
      <td class="nowrap" colspan="2">
        <h2>Your review:</h2>
      </td>
    </tr>
    <tr class="comment hidden">
      <td class="nowrap" width="1%">Title:</td>
      <td class="nowrap"><input type="text" size="80" name="comment_title"/></td>
    </tr>
    <tr class="comment hidden">
      <td class="nowrap" width="1%">Review:</td>
      <td class="nowrap"><textarea rows="10" cols="60" name="comment_content"></textarea></td>
    </tr>
    
    <tr>
      <td></td>
      <td class="nowrap">
        <input type="button" value="Post your opinion!" onclick="submitPostOpinionForm();"/>
        or, <a href="/fnr/resto/{{ resto.uid }}/">go back</a>.
      </td>
    </tr>
  
  </table>

</form><!--/#post_opinion-->

<div id="submitting" class="hidden">
  <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
  Sending your opinion... Please wait...
</div><!--/#submitting-->

{% include "fnr/sections/resto_footer.html" %}


{% endblock %}{# content #}



